package com.j.lemon.learn.jvm;

/**
 * @Author lijunjun
 * @Date 2019-12-19 15:29
 * @Description
 */
public class StackOverFlowDemo {
    private int count = 0;

    private void execute(){
        count++;
        execute();
    }

    public static void main(String[] args) throws Throwable{
        StackOverFlowDemo demo = new StackOverFlowDemo();
        try {
            demo.execute();
        } catch (Throwable e) {
            System.out.println(demo.count);
            throw e;
        }
    }
}
